﻿' LibWowArmory
' by Ronald M. Clifford (roncli@roncli.com)
'
' This source code is released under the GNU Library General Public License (LGPL) Version 2.1.

Imports roncliProductions.LibWowArmory.Item.Info
Imports System

Namespace roncliProductions.LibWowArmory.Item.Search

    ''' <summary>
    ''' A class that encapsulates a single item returned by the Armory search
    ''' </summary>
    ''' <remarks></remarks>
    Public Class Item

        ''' <summary>
        ''' The filename of the item's icon
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property Icon As String

        ''' <summary>
        ''' The item's identification number
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property ItemID As Integer

        ''' <summary>
        ''' The name of the item
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property Name As String

        ''' <summary>
        ''' The rarity of the item
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property Rarity As Enums.RarityType

        ''' <summary>
        ''' The querystring of the item
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property URL As String

        ''' <summary>
        ''' The relevance of the result
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property Relevance As Integer

        ''' <summary>
        ''' Information about the item
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public ReadOnly Property Item As ItemInfo
            Get
                Return New ItemInfo(ItemID)
            End Get
        End Property

        ''' <summary>
        ''' Constructor to create a new item object
        ''' </summary>
        ''' <param name="strIcon"></param>
        ''' <param name="intID"></param>
        ''' <param name="strName"></param>
        ''' <param name="rRarity"></param>
        ''' <param name="strURL"></param>
        ''' <remarks></remarks>
        Public Sub New(ByVal strIcon As String, ByVal intID As Integer, ByVal strName As String, ByVal rRarity As Enums.RarityType, ByVal strURL As String, ByVal intRelevance As Integer)
            Icon = strIcon
            ItemID = intID
            Name = strName
            Rarity = rRarity
            URL = strURL
            Relevance = intRelevance
        End Sub

    End Class

End Namespace